package com.ck.demo;

import cn.hutool.http.ContentType;
import cn.hutool.http.Header;
import cn.hutool.http.HttpRequest;

import java.util.HashMap;
import java.util.Map;

public class HttpDemo {

    public static void main(String[] args) {
        String url = "http://101.37.246.154:5003/Account/Login";
        Map<String, Object> param = new HashMap<>();
        param.put("UserName", "admin");
        param.put("Password","123456");
        param.put("Code","hxsa");
        String result = HttpRequest.post(url)
                .header(Header.CONTENT_TYPE.toString(), ContentType.FORM_URLENCODED.toString())
                .header(Header.REFERER.toString(),"http://101.37.246.154:5003/Account/Index")
                .form(param)
                .execute().body();

        System.out.println(result);
    }
}
